/*
* $Id: EditorDrawer.h 122 2010-07-22 17:05:50Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _EDITOR_DRAWER_H_
#define _EDITOR_DRAWER_H_

#include "../Drawer.h"

class CEditorItem;

class CEditorDrawer : public CDrawer
{
	int m_nPos;
	int m_nHeight;
	std::vector<CEditorItem*> m_aItems;
	CEditorItem* m_pSelectItem;
private:
	CEditorItem* NextItem(CEditorItem* pSelectItem);
	CEditorItem* BackItem(CEditorItem* pSelectItem);
public:
	CEditorDrawer(IWnd* pParent);
	~CEditorDrawer();
public:
	int GetHeightTable();
	void SetBeginPos(int nPos);
	void SetSizeCx(int nSize);
public:
	CEditorItem* GetSelectItem();
	void SelectItem(CPoint pos);
public:
	void AddItem(CEditorItem* item);
	void Clear();
public:
	bool ProcessKey(unsigned int nChar, byte stateSysKey);
	bool ProcessMouse(unsigned int nButton, CPoint pos, int param);
	std::tstring GetValueItem(int nId);
	std::tstring GetNameItem(int nId);
public:
	virtual void Paint(CDC* dc, CRect rect);
	virtual bool IsValidDrawer(Drawer::typeDrawer nType);
};

#endif/*_EDITOR_DRAWER_H_*/